package com.jch.helloworld.configBeans.annotation2;


import com.jch.helloworld.configBeans.annotation1.service.DemoAnnotation1Service;

import com.jch.helloworld.configBeans.annotation2.controller.DemoAnnotation2Controller;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestMain {

    public static void main(String[] args) {

        ApplicationContext ctx = new ClassPathXmlApplicationContext("/beans/beans-annotation.xml");

        System.out.println("Test @Autowired...");
        DemoAnnotation2Controller controller = (DemoAnnotation2Controller) ctx.getBean("demoAnnotation2Controller");
        controller.save();
        System.out.println(controller);

    }

}
